/**
 * 
 */
package com.sicocre.actions;

import java.io.Serializable;

import javax.annotation.PostConstruct;

import org.primefaces.model.TreeNode;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

import com.sicocre.business.service.IEmpleadoService;

/**
 * @author malmanza
 *
 */
@Component
@Scope("request")
public class EstructuraEmpleadosAction implements Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1680907860564191416L;
	
	private TreeNode root;
	
	@Autowired
	private IEmpleadoService service;
	
	@PostConstruct
	public void initRoot(){
		root = service.getEstructuraEmpleados();
	}
	
	/**
	 * @return the root
	 */
	public TreeNode getRoot() {
		return root;
	}

	/**
	 * @param root the root to set
	 */
	public void setRoot(TreeNode root) {
		this.root = root;
	}
	
	

}
